import time
from threading import local
from threading import Thread


# 特殊的对象
xianglong = local()

def task(arg):
    # 对象.val = 1/2/3/4/5
    xianglong.value = arg 
    time.sleep(2)
    print(xianglong.value)

for i in range(10):
    t = Thread(target=task,args=(i,))
    t.start()

    
    
